﻿//using JigLibX.Collision;
//using JigLibX.Geometry;
//using JigLibX.Physics;
using OmegaEngine;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace XNAEngineTest
{
    class FallingBox : PhysicsActor
    {
        // Constructors
        public FallingBox(Model Model, PhysicsObject PhysicsObject)
            : base(Model, PhysicsObject)
        {
            this.PhysicsObject = PhysicsObject;
        }

        public override void Update()
        {
            if (this.PhysicsObject.Velocity.Y < -25)
            {
                if (this.Parent != null)
                {
                    this.DisableComponent();
                    //this.Parent.Components.Remove(this);
                }
            }
            else
                base.Update();
        }
    }
}
